﻿using System;
using System.Collections.Generic;
using System.Text;
using Tao.Sdl;

namespace Ommf
{
    public class Sound
    {
        IntPtr soundHandle;

        internal Sound(string filename)
        {
            soundHandle = SdlMixer.Mix_LoadWAV(filename);
        }

        internal void Play(bool loop)
        {
            SdlMixer.Mix_PlayChannel(-1, soundHandle, loop ? -1 : 0);
        }

        internal void Dispose()
        {
            SdlMixer.Mix_FreeChunk(soundHandle);
        }
    }
}
